package com.tledu.mvc02.service;

import com.tledu.mvc02.mapper.UserMapper;
import com.tledu.mvc02.model.User;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Antg
 * @date 2021/8/12  1:44
 */
@Service
@AllArgsConstructor
public class UserServiceImpl implements UserService{
    private UserMapper userMapper;

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public int add(User user) {
        return userMapper.add(user);
    }

    @Override
    public int edit(User user) {
        return userMapper.edit(user);
    }

    @Override
    public int del(int id) {
        return userMapper.del(id);
    }
}
